﻿Sample programs
===============

These programs are designed to work in XyWrite 3 and Nota Bene 3. (DEL_KEY and INS_KEY date back to 1997, and they have been used without modification ever since).

To illustrate the use of COMPILE.R, the following sample programs are attached:

DEL_KEY.R                       Cut/DelChar
DEL_KEY.T
DF_NEXTP.R                      Define next para and ff.
DF_NEXTP.T
DF_NEXTW.R                      Define next word and ff.
DF_NEXTW.T
DF_PREVP.R                      Define previous para and ff.
DF_PREVP.T
DF_PREVW.R                      Define previous word and ff.
DF_PREVW.T
INS_KEY.R                       Insert
INS_KEY.T

All these programs are best used by loading them into memory, e.g.:
ldpm C:\NB\DEL_KEY.R,&d = Cut
ldpm C:\NB\INS_KEY.R,&i = Paste
ldpm C:\NB\DF_NEXTP.R,&n = Paste
etc.

DEL_KEY.R and INS_KEY.R work as a pair and they are complemented by the additional defining routines.

In the keyboard file, put e.g.:
Del=&d
Ins=&i
Ctrl+Padplus=&d,&i

&d,&i accomplishes a copy function.

The defining functions replace DP and DW. They differ by leaving the define open when pressed multiple times, thus allowing easy movement backwards within the define. Define can be finetuned with Ctrl keys. The above cut, paste and copy functions handle closing the define.

For moving around and defining, the following keyboard setup is suggested (using enhanced arrow keys):
Up              Prev para     pp,ff
Dn              Next para     np,ff
Left            Prev word     pw,ff
Right           Next word     nw,ff

Shift+Up        DF_PREVP.R
Shift+Dn        DF_NEXTP.R
Shift+Left      DF_PREVW.R
Shift+Right     DF_NEXTW.R

Ctrl+Up         Linear up (LU)
Ctrl+Dn         Linear dn (LD)
Ctrl+Left       Linear left (CL)
Ctrl+Right      Linear right (CR)

The defining programs allow you to define (backwards) with one keypress, move back and forth within the define to finetune it, change the direction of the define after starting it.
